<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    img{
      width: 200px;
    }
    .active{
      color: red;
    }
  </style>
</head>
<body>
  <div id="app"></div>

  <template id="my-app">
    <!-- <div :class="className">子进</div>
    <div :class="{'active': isActive}">君君</div>
    <button @click="change">切换</button> -->

    <!-- <div :class="{'active': isActive, 'title': true}">但总</div>
    <div class="lang" :class="className">浪哥</div>
    <div class="baobao" :class="classObj">旭旭宝宝</div> -->
    <!-- <div class="baby" :class="getClass()">阳阳宝贝</div> -->

    <div :class="['feng', 'baby', className]">冯总</div>
    <div :class="['wang', isActive ? 'active' : '']">老王</div>
    <div :class="['hengheng', {'active': isActive}]">恒恒</div>
  </template>


  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <script>
    const App = {
      template: '#my-app',
      data() {
        return {
          className: 'username',
          isActive: true,
          classObj: {
            active: true,
            title: true
          },
        }
      },
      methods: {
        change() {
          this.isActive = !this.isActive
        },
        getClass() {
          return 'yangyang'
        }
      }
    }

    Vue.createApp(App).mount('#app')
  </script>

</body>
</html>